package com.jsoft.pds.bs.service.Impl;

import java.util.List;

import com.jsoft.pds.bs.dao.PediatricsDao;
import com.jsoft.pds.bs.service.PediatricsService;
import com.jsoft.pds.eis.bo.base.BaseEntity;

/**
 * @author developer 
 */
public class PediatricsServiceImpl implements PediatricsService{
	
	private PediatricsDao pediatricsDao;

	public <T> BaseEntity save(BaseEntity baseEntity) {
		return this.getPediatricsDao().save(baseEntity);		
	}
	
	public void update(BaseEntity baseEntity){
		this.getPediatricsDao().update(baseEntity);
	}
	
	public void delete(BaseEntity baseEntity){
		this.getPediatricsDao().delete(baseEntity);
	}
	
	public <T> List<T> find(BaseEntity baseEntity) {
		return this.getPediatricsDao().find(baseEntity);
	}
	
	public <T> BaseEntity findById(Class<? extends BaseEntity> clazz, Integer id) {
		return this.getPediatricsDao().findById(clazz, id);
	}
	
	public <T> List<T> findAll(Class<? extends BaseEntity> clazz) {
		return this.getPediatricsDao().findAll(clazz);
	}
	
	public PediatricsDao getPediatricsDao() {
		return pediatricsDao;
	}
	public void setPediatricsDao(PediatricsDao pediatricsDao) {
		this.pediatricsDao = pediatricsDao;
	}
}
